<?php
class library extends controller {
	function __construct()
	{
		parent::__construct();
	}
	function load($a=false)
	{
		if ( $a === false ) {
			foreach ($this->config->libraries as $lib)
			{
				$this->$lib =& load_class($lib);
			}
		}
		else {
			$libs = array();
			if ( is_array($a) )
			{
				foreach ( $a as $lib )
				{
					$this->$lib =& load_class($lib);
					$libs[$lib] = $this->$lib;
				}
			}
			else
			{
				$this->$a =& load_class($a);
				$libs[$a] = $this->$a;
			}
			return $libs;
		}
	}
	function error($msg,$die=false)
	{
		$this->qcms->error($msg,$die);
	}
	function __toString()
	{
		return "library";
	}
}
?>